<!DOCTYPE html>
<html>

{include file='public/header'}
<style>
    .layui-table-view{margin: 0px;}
</style>
<body>
    <table id="dailyRechargeDetails" lay-filter="dailyRechargeDetails"></table>
    <script>
        let fxs = GetQueryString('is_distributor');
        let params = {
            elem: '#dailyRechargeDetails'
            , toolbar: true
            , url: '' //数据接口
            , id: 'dailyRechargeDetails'
            , page:true
            , cols: []
        }
        if(fxs == 1){
            console.log('分销商 和 分销商投手')
            params.url = '/cps/order/distributionLtvData?link_id='+GetQueryString('link_id')
            params.cols = [[ //表头
                { field: 'date', title: '日期', width: 110, align:'center' }
                , { field: 'activation_user_num', title: '激活用户数', align:'center' }
                , { field: 'current_recharge', title: '当期充值', align:'center' }
                , { field: 'total_recharge', title: '累计充值', align:'center' }
                , { field: 'recharge_people_num', title: '充值人数', align:'center' }
                , { field: 'per_capita', title: '人均贡献', align:'center' }
                , { field: 'two_day_recharge', title: '第2天充值', align:'center' }
                , { field: 'three_day_recharge', title: '第3天充值', align:'center' }
                , { field: 'four_day_recharge', title: '第4天充值', align:'center' }
                , { field: 'five_day_recharge', title: '第5天充值', align:'center' }
                
            ]]
        }else{
            console.log('正常')
            params.url = '/cps/order/dailyRechargeDetails?link_id='+GetQueryString('link_id')
            params.cols = [[ //表头
                { field: 'date', title: '日期', width: 110, align:'center' }
                , { field: 'activation_user_num', title: '激活用户数', align:'center' }
                , { field: 'actual_cost', title: '实际成本', align:'center' }
                , { field: 'current_recharge', title: '当期充值', align:'center' }
                , { field: 'current_recovery', title: '当期回收', align:'center' }
                , { field: 'total_recharge', title: '累计充值', align:'center' }
                , { field: 'total_recovery', title: '累计回收', align:'center' }
                , { field: 'conversion_number', title: '充值人数', align:'center' }
                , { field: 'conversion_cost', title: '转化成本', align:'center' }
                , { field: 'per_capita_contribution', title: '人均贡献', align:'center' }
                // , { field: '1_day', title: '第1天充值金额', align:'center' }
                , { field: '2_day', title: '第2天充值', align:'center' }
                , { field: '3_day', title: '第3天充值', align:'center' }
                , { field: '4_day', title: '第4天充值', align:'center' }
                , { field: '5_day', title: '第5天充值', align:'center' }
                , { field: '6_day', title: '第6天充值', align:'center' }
                , { field: '7_day', title: '第7天充值', align:'center' }
                , { field: '8_day', title: '第8天充值', align:'center' }
                
            ]]
        }
        tableList(params)
    </script>
</body>

</html>